package 输入方案;

import java.util.Scanner;

/**
 * @author zc
 * @version 1.0
 * @date 2021/8/31 15:23
 * 对于多组测试用例的情况下只需要加一个while(s.hasNext())判断即可
 */
public class Demo03 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入多测试用例");
        while(scanner.hasNext()){
            String s = scanner.nextLine();
            if(s.equals("eof")) break;
            String[] s1 = s.split(" ");
            for (int i = 0; i < s1.length; i++) {
                System.out.print(s1[i]+" ");
            }
            System.out.println();
        }
    }

}
